<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>注册 - 新能源汽车大数据平台</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
</head>
<body>
    <div class="form-container">
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                <div class="alert alert-{{ category }}">
                    {{ message }}
                </div>
                {% endfor %}
            {% endif %}
        {% endwith %}

        <h1>创建新账户</h1>
        <p class="subtitle">加入新能源汽车大数据平台</p>

        <form action="/register" method="post">
            <div class="input-group">
                <i class="fas fa-user"></i>
                <input type="text" name="username" placeholder="设置用户名" required>
            </div>
            <div class="input-group">
                <i class="fas fa-lock"></i>
                <input type="password" name="password" placeholder="设置密码" required>
            </div>
            <button type="submit" class="btn register">注 册</button>
        </form>

        <div class="switch-link">
            <p>已有账户？ <a href="{{ url_for('home') }}">返回登录</a></p>
        </div>
    </div>
</body>
</html>